<%@ page import="com.scalar.chiptrack.utils.ConfigManager" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<bean:size id="ALSize" name="changedLineItems" />
<logic:greaterThan name="ALSize" value="0">
<table border="0" width="95%">
    <tr>
        <td align="left"><font class="NArialL" color="#FFFFFF">Changed Line Items</font></td>
    </tr>
    <tr>
        <td>
            <table border="0" width="100%" bordercolor="#FFFFFF" cellSpacing="2" cellPadding="2">
                <tr>
                    <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Line Item</font></font></td>
                    <td width="5%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">PO Line Item</font></font></td>
                    <td width="15%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF"><bean:message key="label.mfgPartNumber"/></font></font></td>
                    <td width="15%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF"><bean:message key="label.customerPartNumber"/></font></font></td>
                    <td width='5%' align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Taxable</font></font></td>
                    <td width="15%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Req'd Dock Date</font></font></td>
                    <td width="15%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Lead Time</font></font></td>
                    <td width="10%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Quantity&nbsp;*</font></font></td>
                    <%
                        if(ConfigManager.isShowQuoteMinOrderQty()) {
                    %>
                        <td width="10%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Min Order Quantity</font></font></td>
                    <%
                        }
                    %>
                    <logic:equal value="true" name="QuotationForm" property="distributor">
                        <%
                            if (ConfigManager.isShowQuoteRequestedPrice())
                            {
                        %>
                                <td width="10%" align="center" bgcolor="#993333" class="NArialL"><font color="#FFFFFF"><bean:message key="label.sales.requestedPrice"/></font></td>
                        <%
                            }
                            if ( ConfigManager.isShowQuoteCustResalePrice() )
                            {
                        %>
                                <td width="10%" align="center" bgcolor="#993333" class="NArialL"><font color="#FFFFFF"><bean:message key="label.sales.customerResalePrice"/></font></td>
                        <%
                            }
                        %>
                    </logic:equal>
                    <td width="15%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF"><bean:message key="label.sales.price"/></font></font></td>
                    <logic:equal value="true" name="QuotationForm" property="distributor">
                    <%
                        if ( ConfigManager.isShowQuoteSuggResalePrice() )
                        {
                    %>
                            <td width="10%" align="center" bgcolor="#993333" class="NArialL"><font color="#FFFFFF"><bean:message key="label.sales.suggestedResalePrice"/></font></td>
                    <%
                        }
                    %>
                    </logic:equal>
                    <td width="15%" align="center" bgcolor="#993333"><font class="NArialL"><font color="#FFFFFF">Amount</font></font></td>
                </tr>
                <logic:iterate id="lineItem" name="changedLineItems" type="com.scalar.chiptrack.sales.LineItem">
                <tr bgcolor="#DEE1E2">
                    <td bgcolor="#DEE1E2" align=center ><font class="NArialL"><bean:write name="lineItem" property="quotationLineItemNo" /></font></td>
                    <td bgcolor="#DEE1E2" align=center ><font class="NArialL"><bean:write name="lineItem" property="poLineItemNo" /></font></td>
                    <td bgcolor="#DEE1E2" nowrap><font class="NArialL"><bean:write name="lineItem" property="manufacturingPartNo" /></font></td>
                    <td bgcolor="#DEE1E2" nowrap><font class="NArialL"><bean:write name="lineItem" property="customerPartNo" /></font></td>
                    <td bgcolor="#DEE1E2" class="NArialL" align=center><bean:write name="lineItem" property="isTaxableAsString"/></td>
                    <td bgcolor="#DEE1E2"><font class="NArialL"><bean:write name="lineItem" property="requestDate" /></font></td>
                    <td bgcolor="#DEE1E2"><font class="NArialL"><bean:write name="lineItem" property="leadTime" /></font></td>
                    <td bgcolor="#DEE1E2" align=right><font class="NArialL"><bean:write name="lineItem" property="qtyAsString" /></font></td>
                    <%
                        if(ConfigManager.isShowQuoteMinOrderQty()) {
                    %>
                        <td bgcolor="#DEE1E2" align=right><font class="NArialL"><bean:write name="lineItem" property="minOrderQtyAsString" /></font></td>
                    <%
                        }
                    %>
                    <logic:equal value="true" name="QuotationForm" property="distributor">
                        <% 
                            if ( ConfigManager.isShowQuoteRequestedPrice() )
                            {
                        %>
                                 <td bgcolor="#DEE1E2" align=right class="NArialL"><bean:write name="lineItem" property="reqPriceAsString"/></td>
                        <%
                            }
                            if ( ConfigManager.isShowQuoteCustResalePrice() )
                            {
                        %>
                                <td bgcolor="#DEE1E2" align=right class="NArialL"><bean:write name="lineItem" property="custResaleAsString"/></td>
                        <%
                            }
                        %>
                    </logic:equal>
                    <td bgcolor="#DEE1E2" align=right><font class="NArialL"><bean:write name="lineItem" property="unitPriceAsString" /></font></td>
                    <logic:equal value="true" name="QuotationForm" property="distributor">
                        <%
                            if ( ConfigManager.isShowQuoteSuggResalePrice() )
                            {
                        %>
                                <td bgcolor="#DEE1E2" class="NArialL" align=right><bean:write name="lineItem" property="suggResaleAsString"/></td>
                        <%
                            }
                        %>
                    </logic:equal>
                    <td bgcolor="#DEE1E2" align=right><font class="NArialL"><bean:write name="lineItem" property="amountAsString" /></font></td>
                </tr>
                </logic:iterate>
            </table>
        </td>
    </tr>
</table>
</logic:greaterThan>